﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewPartnerUc.ascx.cs" Inherits="VCN.admin.UC.ViewPartnerUc" %>

<link href="/admin/Style/General.css"  rel="stylesheet" type="text/css" />

<script src="/admin/JS/JScript_checkbox.js" type="text/javascript"></script>

<span class="lblheader">DANH SÁCH ĐỐI TÁC</span>
 <hr style="margin-bottom: 20px" />
<div id="viewpartneruc">
    <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
        <tr>
            <td class="cssPageTitleBG" colspan="2">
                <asp:Label ID="Label2" runat="server" CssClass="cssPageTitle" Text="Bộ lọc" />
            </td>
        </tr>
        <tr>
            <td style="height: 30px; width: 25%">
                <span class="cssManField">Lựa chọn:</span>
            </td>
            <td>
                <asp:DropDownList ID="drdoptionPartner" runat="server" Height="19px" Width="186px"
                    AutoPostBack="True" OnSelectedIndexChanged="drdoptionPartner_SelectedIndexChanged">
                    <asp:ListItem Selected="True" Text="Quản lý logo công ty" Value="0"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Quản lý logo đối tác" Value="2"></asp:ListItem>                                      
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="cssPageTitleBG" colspan="2">
                <asp:Label ID="m_lblresult" runat="server" CssClass="cssPageTitle" Text="Danh sách" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="m_lbl_message" Text="" Visible="false" runat="server" CssClass="lblMassage"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="grvViewPartner" runat="server" AutoGenerateColumns="false" CellPadding="4"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                    ForeColor="black" GridLines="Both" AllowPaging="true" OnPageIndexChanging="grvViewPartner_PageIndexChanging"
                    Width="100%">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                               <input type="checkbox" id="chkAll" onclick="javascript:SelectAllCheckboxes(this)" runat="server" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkItem" ToolTip='<%#Eval("Id") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                                Ảnh minh họa</HeaderTemplate>
                            <ItemTemplate>
                                <a href="addpartner.aspx?PId=<%#Eval("Id") %>">
                                    <img alt="Ảnh đối tác" width="250px" height="80px" class="imgMinhhoa" src='/home/Images/Logo/<%# Eval("Image") %>' /></a>
                                </a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                                Link liên kết</HeaderTemplate>
                            <ItemTemplate>
                                <a href="<%# Eval("Link")%>">
                                    <%# Eval("Link")%>
                                </a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                                Tên mô tả (tiếng việt)</HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("Name") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                                Trạng thái hoạt động</HeaderTemplate>
                            <ItemTemplate>
                                <%# encodeStatus((bool)Eval("Status")) %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
                            <HeaderTemplate>
                                Hành động</HeaderTemplate>
                            <ItemTemplate>
                                <a href="addpartner.aspx?PId=<%# Eval("Id")%>">Sửa</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    <p class="buttonClss">
        <asp:Button ID="cmdDel" runat="server" Text="Delete" Height="26px" Width="98px" CssClass="cssButton"
            OnClientClick="return confirm('Bạn có chắc muốn xóa không?');" OnClick="cmdDel_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="m_cmd_add_news" runat="server" Text="Thêm mới" Height="26px" Width="98px"
            CssClass="cssButton" OnClick="m_cmd_add_news_Click" />
    </p>
    <p class="buttonClss">
        <asp:Label ID="lblMessage" Text="" Visible="false" runat="server" CssClass="lblMassage"></asp:Label></p>
</div>
<style type="text/css">
    .view-top-news
    {
        text-decoration: none;
    }
    p.buttonClss
    {
        width: 90%;
        text-align: left;
    }
    .lblMessage
    {
        text-align: center;
    }
    .lblMassage
    {
        font-weight: bold;
        color: Red;
    }
    .imgMinhhoa
    {
        width: 100px;
        height: 70px;
    }
</style>
<link href="../Style/csspagenews.css" rel="stylesheet" type="text/css" />
